package cn.bone.springcloud.base.conf;

import cn.bone.myrole.MySelfRule;
import feign.Logger;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/*
    服务 consul-provider-payment2 替换默认的负载均衡策略
    从默认的轮询改为自定义返回的随机
 */
@Configuration
@RibbonClient(name = "consul-provider-payment2", configuration = MySelfRule.class)
public class FeignConfig {

    /*配置Feign的日志级别*/
    @Bean
    public Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }
}
